<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function Dog(name, age) {
      this.name = name
      this.age = age
      // this.run = function () {
      //   console.log(this);
      //   console.log('跑的很快');
      // }
    }
    const d1 = new Dog()

    function Car(name, price) {
      this.name = name
      this.price = price
      this.run = function () {
        console.log(this);
        console.log('跑的很快');
      }
    }
    const c1 = new Car()

    // d1.run()
    c1.run.call(d1)
    c1.run()
    //console.log(c1,'c1');
    // console.log(d1.run.call(c1),'1111');
    // console.log(d1,'d1');
    // function fn1() {
    //   console.log(1);
    // }

    // function fn2() {
    //   console.log(2);
    // }
    // // fn1.call(fn2());
    // fn1.call(fn2)
    // fn1.call.call(fn2);
  </script>
</body>

</html>